# Contributor: prspkt <prspkt@protonmail.com>
# Maintainer: prspkt <prspkt@protonmail.com>
pkgname=py3-zipp
pkgver=3.17.0
pkgrel=0
pkgdesc="Pathlib-compatible object wrapper for zip files"
url="https://github.com/jaraco/zipp"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-gpep517 py3-setuptools py3-setuptools_scm py3-wheel"
checkdepends="py3-pytest py3-jaraco.itertools py3-func-timeout py3-jaraco.functools"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/z/zipp/zipp-$pkgver.tar.gz"
builddir="$srcdir/zipp-$pkgver"

replaces="py-zipp" # Backwards compatibility
provides="py-zipp=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/zipp*.whl
}

sha512sums="
efd100add7e8face19a6163d07b5efbef6f896d1f3ed2dbdd443ed7e523428bd779d1f05dfe806d4d2bbe10c17c21136f2a0b6f0cbe6000dd8a6abb86dede725  zipp-3.17.0.tar.gz
"
